solve -8-8p^2=-31 by taking square roots